# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1WriteTensorboardRunDataRequest do
  @moduledoc """
  Request message for TensorboardService.WriteTensorboardRunData.

  ## Attributes

  *   `tensorboardRun` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the TensorboardRun to write data to. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
  *   `timeSeriesData` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1TimeSeriesData.t)`, *default:* `nil`) - Required. The TensorboardTimeSeries data to write. Values with in a time series are indexed by their step value. Repeated writes to the same step will overwrite the existing value for that step. The upper limit of data points per write request is 5000.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :tensorboardRun => String.t() | nil,
          :timeSeriesData =>
            list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1TimeSeriesData.t()) | nil
        }

  field(:tensorboardRun)

  field(:timeSeriesData,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1TimeSeriesData,
    type: :list
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1WriteTensorboardRunDataRequest do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1WriteTensorboardRunDataRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1WriteTensorboardRunDataRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
